package stack.era.presentation;

import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;

import javax.swing.JPanel;

public class ERAInfoPanel extends JPanel {

	private static final long serialVersionUID = 480767906063171469L;

	public ERAInfoPanel() {
		super();

		this.setBackground(Color.WHITE);
		this.setForeground(Color.BLACK);
		this.setOpaque(false);
		this.setBorder(null);
	}

	@Override
	public void paint(Graphics g) {
		Graphics2D g2 = (Graphics2D) g.create();
		g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,
				0.5f));
		g2.setColor(this.getBackground());
		g2.fillRoundRect(0, 0, this.getWidth(), this.getHeight(), 30, 30);
		g2.setColor(Color.BLACK);
		g2.setStroke(new BasicStroke(5f));
		g2.drawRoundRect(0, 0, this.getWidth(), this.getHeight(), 30, 30);
		g2.dispose();
		super.paint(g);
	}

}
